package com.itlong.cloud.equip.operate;

import com.itlong.cloud.POJO.VO.operate.OperateAddressVO;
import com.itlong.cloud.POJO.VO.operate.OperateAreaAddressVO;
import com.itlong.cloud.POJO.VO.operate.OperateCountryAddressVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * <desc>
 *     运营-运营管理-项目地址服务接口暴露。
 * <desc/>
 *
 * @createDate 2017/10/23.
 */
@FeignClient(name = "project-service")
public interface IOperateAddressManageServiceClient {

     /**
      * <desc>
      *      获取国家信息列表。
      * <desc/>
      *
      * @param
      * @return 返回国家信息列表（国家ID和国际名称）
      * @author shengen.T
      * @createDate 2017/10/23
      */
    @RequestMapping(path="/operate/addressManage/getCountry",method = RequestMethod.POST)
    List<OperateCountryAddressVO> getCountry() throws Exception;


     /**
      * <desc>
      *      获取区域信息列表。
      * <desc/>
      *
      * @param  countryId 国家ID
      * @return
      * @author shengen.T
      * @createDate 2017/10/23
      */
    @RequestMapping(path="/operate/addressManage/getArea/{countryId}",method = RequestMethod.GET)
    List<OperateAreaAddressVO> getArea(@PathVariable("countryId") String countryId) throws Exception;

    /**
     * <desc>
     *      获取某个地址的直接下属地址
     * <desc/>
     *
     * @param parentAddressId 父地址
     * @return
     * @author Chunjian.G
     * @createDate 2017-12-05
     */
    @RequestMapping(path="/operate/addressManage/getAddress",method = RequestMethod.POST)
    List<OperateAddressVO> getAddress(@RequestParam("parentAddressId") String parentAddressId) throws Exception;
}
